home *** CD-ROM | disk | FTP | other *** search
- -- the following script is in the Play/Pause button
-
- on mouseUp
- global gSWAStatus,gSWAFlag,gSWAFile
- if gSWAFile <> the text of field "argument" then
- stop (member "SWAHolder")
- set gSWAFile = the text of field "argument"
- set the URL of member "SWAHolder" = gSWAFile
- end if
- if (gSWAstatus <= 2) or (gSWAstatus = 4) then
- play (member "SWAHolder")
- else if gSWAstatus = 3 then
- pause (member "SWAHolder")
- end if
- end
-
- -- the next one is in the Stop button
- on mouseUp
- stop (member "SWAHolder")
- end
-
-
- -- next are some important movie scripts
- -- the globals are declared at the top of the movie script,
- -- so they are not repeated in the handlers
-
- on idle
- if gSWAflag = 1 then checkSWA "SWAholder"
- end
-
- on checkSWA membername
- set gSWAstatus = the state of member membername
- if gSWAstatus = 2 then
- -- the SWA is ready to play
- else if gSWAstatus = 3 then
- updateTimeBar (the percentPlayed of member membername)
- else if gSWAstatus = 5 then
- updateTimeBar 100
- set gSWAflag = 0
- else if gSWAstatus = 9 then
- set errorCode = getError(member membername)
- set errorString = getErrorString(member membername)
- debug errorCode,errorString
- set gSWAflag = 0
- end if
- end